public interface MemoryManager
{
	public String toString();

	public boolean isEmpty();

	public int getSize();

	/** Attempts to allocate memory of the specified size. Returns a String containting
	 *  the UID of the transaction and the starting address if successful. If unsuccessful, -1.
	 * @param size The amount of memory to allocate
	 * @return the ID and the address of the Memory as a String in the form "ID Address"
	 */
	public String allocate(int size);

	/** Attempts to free the memory allocated at the Block with the designated UID. Returns a String stating whether
	 * the memory was successfully freed or not. 
	 * @param UID The unique ID number of the memory block
	 * @return "SUCCESS" if successful or "FAILED" otherwise
	 */
	public String deallocate(int UID);

	/**
	 * Calls defrag on the SortingArray, clears the MemoryManager, then  rebuilds it again from the sorted SortingArray.
	 */
	public void defrag();

	/**
	 * This will call quicksort and bucketsort in that order!! And pass the Statistic as a parameter
	 * @param s the Statistic
	 * @throws InterruptedException 
	 */
	public void sort(Statistics s) throws InterruptedException;

}